import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.PrintStream;
import java.util.Scanner;


public class BasedImageLibras {
	
	static final int N = 150, M = 4;
	static final int Q = 1;
	static final int scale = 50;
	
	public static double bagunca(double x) {
		return x*77 + 0.7777777;
	}
	
	public static int getCluster(String s) {
		if(s.equalsIgnoreCase("Iris-setosa")) return 1;
		if(s.equalsIgnoreCase("Iris-versicolor")) return 2;
		if(s.equalsIgnoreCase("Iris-virginica")) return 3;
		return -1;
	}
	
	public static void main(String[] args) throws Exception {
		Scanner scanner = new Scanner(new File("in.txt"));
		PrintStream printStream = new PrintStream(new File("iris-bagunca.sds"));
		System.setOut(printStream);
		
		int cluster[] = new int[N];
		double x[][] = new double[N][M];
		
		int falta[] = new int[] { 0, 5, 5, 5 };
		
		//double y[][] = new double[N][M];
		
		//System.out.println("RECTANGLE_MATRIX = (");
		
		for(int it = 0; it < N; it++) {
			// data
			String pieces[] = scanner.nextLine().split(",");
			
			// to draw
			//BufferedImage image = new BufferedImage(scale,scale,BufferedImage.TYPE_INT_RGB);
			//Graphics graphics = image.getGraphics();
			//graphics.setColor(Color.WHITE);
			//graphics.fillRect(0, 0, scale, scale);
			//graphics.setColor(Color.BLACK);
			
			// get data
			for(int i = 0; i < M; i++) {
				x[it][i] = Double.parseDouble(pieces[i]);
				//y[it][i] = Double.parseDouble(pieces[2*i+1]);
				//int xp = (int)(x[it][i]*scale), yp = (int)(y[it][i]*scale);
				//graphics.drawLine(xp,yp,xp,yp);
				//graphics.fillOval(xp, yp, 5, 5);
			}
			
			cluster[it] = getCluster(pieces[4]);
			//cluster[it] = Integer.parseInt(pieces[90]);
			
			//System.out.print("(" + cluster[it]);
			
			//for(int xx = 0; xx < scale; xx++) {
			//	for(int yy = 0; yy < scale; yy++) {
			//		int color = (image.getRGB(xx,yy) == Color.BLACK.getRGB() ? 1 : 0);
			//		System.out.printf(",(%d : %d)", color, color);
			//		System.out.printf(",(%d : %d)", color, color);					
			//	}
			//}
			
			//System.out.print(")");
			//if(it+1 != N) System.out.print(",");
			//System.out.println();
			
			/*String id = "" + (it+1);
			while(id.length() < 3) id = "0"+id;
			File outputfile = new File("img/libras" + id + ".png");
			ImageIO.write(image, "png", outputfile);*/
		}
		
		
		// generate file
		System.out.println("RECTANGLE_MATRIX = (");
		for(int it = 0; it < N; it++) {
			System.out.print("(" + cluster[it]);
			for(int i = 0; i < M; i++) {
				
				double res = x[it][i];
				
				if(i == 2 && falta[cluster[it]]-- > 0) {
					res = bagunca(res);
				}
				
				System.out.printf(",(%.4f : %.4f)", res, res);
				
				//double xp = x[it][i], yp = y[it][i], xq = x[it][Math.min(i+1,44)], yq = y[it][Math.min(i+1,44)];
				//double ix = (xq - xp) / Q, iy = (yq - yp) / Q;
				//for(int j = 0; j < Q; j++) {
				//	System.out.printf(",(%.4f : %.4f)", xp, xp);
					//System.out.printf(",(%.4f : %.4f)", yp, yp);
				//	xp += ix;
				//	yp += iy;
				//}
			}	
			System.out.print(")");
			if(it+1 != N) System.out.print(",");
			System.out.println();
		}
		System.out.println(")");
		
		
	}
}
